In-loop filtering-based image coding device and method

ABSTRACT

According to embodiments of the present document, information for performing in-loop filtering by crossing virtual boundaries can be efficiently signaled. In one embodiment, the value of a virtual boundary-related flag signaled through a picture header can be determined on the basis of the value of a virtual boundary-related flag signaled through an SPS.

BACKGROUND OF THE DISCLOSURE Field of the disclosure

The present document relates to an apparatus and method for image codingbased on in-loop filtering.

Related Art

Recently, demand for high-resolution, high-quality image/video such as4K or 8K or higher ultra high definition (UHD) image/video has increasedin various fields. As image/video data has high resolution and highquality, the amount of information or bits to be transmitted increasesrelative to the existing image/video data, and thus, transmitting imagedata using a medium such as an existing wired/wireless broadband line oran existing storage medium or storing image/video data using existingstorage medium increase transmission cost and storage cost.

In addition, interest and demand for immersive media such as virtualreality (VR) and artificial reality (AR) content or holograms hasrecently increased and broadcasting for image/video is havingcharacteristics different from reality images such as game images hasincreased.

Accordingly, a highly efficient image/video compression technology isrequired to effectively compress, transmit, store, and reproduceinformation of a high-resolution, high-quality image/video havingvarious characteristics as described above.

Specifically, an in-loop filtering procedure is performed to increasesubjective/objective visual quality, and there is discussion on a methodfor increasing signaling efficiency of information for performingin-loop filtering based on virtual boundaries.

SUMMARY

According to an embodiment of the present document, a method and anapparatus for increasing image/video coding efficiency are provided.

According to an embodiment of the present document, a method andapparatus for applying efficient filtering application are provided.

According to an embodiment of the present document, a method andapparatus for effectively applying deblocking, sample adaptive offset(SAO), and adaptive loop filtering (ALF) are provided.

According to an embodiment of the present document, in-loop filteringmay be performed based on virtual boundaries.

According to an embodiment of the present document, a sequence parameterset (SPS) may include a virtual boundaries enabled flag indicatingwhether in-loop filtering is performed across virtual boundaries.

According to an embodiment of the present document, in-loop filteringmay be performed across the virtual boundaries, based on the virtualboundaries enabled flag.

According to an embodiment of the present document, a value of a virtualboundaries-related flag to be signaled through a picture header may bedetermined based on a value of a virtual boundaries-related flag to besignaled through an SPS.

According to an embodiment of the present document, an encodingapparatus for performing video/image encoding is provided.

According to one embodiment of the present document, there is provided acomputer-readable digital storage medium in which encoded video/imageinformation, generated according to the video/image encoding methoddisclosed in at least one of the embodiments of the present document, isstored.

According to an embodiment of the present document, there is provided acomputer-readable digital storage medium in which encoded information orencoded video/image information, causing to perform the video/imagedecoding method disclosed in at least one of the embodiments of thepresent document by the decoding apparatus, is stored.

According to an embodiment of the present document, overall image/videocompression efficiency may be improved.

According to an embodiment of the present document, subjective/objectivevisual quality may be improved through efficient filtering.

An in-loop filtering procedure based on virtual boundaries according toan embodiment of present document may save a hardware resource.

According to an embodiment of the present document, the in-loopfiltering procedure based on the virtual boundaries may be effectivelyperformed, and filtering performance may be improved.

According to an embodiment of the present document, information forin-loop filtering based on the virtual boundaries may be effectivelysignaled.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 schematically shows an example of a video/image coding system towhich embodiments of the present disclosure may be applied.

FIG. 2 is a view schematically illustrating the configuration of avideo/image encoding apparatus to which embodiments of the presentdisclosure may be applied.

FIG. 3 is a view schematically illustrating the configuration of avideo/image decoding apparatus to which embodiments of the presentdisclosure may be applied.

FIG. 4 exemplarily shows a hierarchical architecture for a codedvideo/image.

FIG. 5 is a flowchart illustrating an encoding method based on filteringin an encoding apparatus.

FIG. 6 is a flowchart illustrating a decoding method based on filteringin a decoding apparatus.

FIG. 7 and FIG. 8 schematically show an example of a video/imageencoding method and related components according to embodiment(s) of thepresent document.

FIG. 9 and FIG. 10 schematically show an example of a video/imageencoding method and related components according to embodiment(s) of thepresent document.

FIG. 11 represents an example of a contents streaming system to whichthe embodiment of the present document may be applied.

DESCRIPTION OF EXEMPLARY EMBODIMENTS

The present disclosure may be modified in various forms, and specificembodiments thereof will be described and illustrated in the drawings.However, the embodiments are not intended for limiting the disclosure.The terms used in the following description are used to merely describespecific embodiments, but are not intended to limit the disclosure. Anexpression of a singular number includes an expression of the pluralnumber, so long as it is clearly read differently. The terms such as“include” and “have” are intended to indicate that features, numbers,steps, operations, elements, components, or combinations thereof used inthe following description exist and it should be thus understood thatthe possibility of existence or addition of one or more differentfeatures, numbers, steps, operations, elements, components, orcombinations thereof is not excluded.

In addition, each configuration of the drawings described in thisdocument is an independent illustration for explaining functions asfeatures that are different from each other, and does not mean that eachconfiguration is implemented by mutually different hardware or differentsoftware. For example, two or more of the configurations can be combinedto form one configuration, and one configuration can also be dividedinto multiple configurations. Without departing from the gist of thisdocument, embodiments in which configurations are combined and/orseparated are included in the scope of claims.

Hereinafter, examples of the present embodiment will be described indetail with reference to the accompanying drawings. In addition, likereference numerals are used to indicate like elements throughout thedrawings, and the same descriptions on the like elements will beomitted.

This document relates to video/image coding. For example,methods/embodiments disclosed in this document may be related to theversatile video coding (VVC) standard (ITU-T Rec. H.266), thenext-generation video/image coding standard after VVC, or other videocoding related standards (e.g., high efficiency video coding (HEVC)standard (ITU-T Rec. H.265), essential video coding (EVC) standard, AVS2standard, and the like).

This document suggests various embodiments of video/image coding, andthe above embodiments may also be performed in combination with eachother unless otherwise specified.

In this document, a video may refer to a series of images over time. Apicture generally refers to the unit representing one image at aparticular time frame, and a slice/tile refers to the unit constitutinga part of the picture in terms of coding. A slice/tile may include oneor more coding tree units (CTUs). One picture may consist of one or moreslices/tiles. One picture may consist of one or more tile groups. Onetile group may include one or more tiles.

A pixel or a pel may mean a smallest unit constituting one picture (orimage). Also, ‘sample’ may be used as a term corresponding to a pixel. Asample may generally represent a pixel or a value of a pixel, and mayrepresent only a pixel/pixel value of a luma component or only apixel/pixel value of a chroma component.

A unit may represent a basic unit of image processing. The unit mayinclude at least one of a specific region of the picture and informationrelated to the region. One unit may include one luma block and twochroma (ex. cb, cr) blocks. The unit may be used interchangeably withterms such as block or area in some cases. In a general case, an M×Nblock may include samples (or sample arrays) or a set (or array) oftransform coefficients of M columns and N rows. Alternatively, thesample may mean a pixel value in the spatial domain, and when such apixel value is transformed to the frequency domain, it may mean atransform coefficient in the frequency domain.

In this document, the term “/” and “,” should be interpreted to indicate“and/or.” For instance, the expression “A/B” may mean “A and/or B.”Further, “A, B” may mean “A and/or B.” Further, “A/B/C” may mean “atleast one of A, B, and/or C.” Also, “A/B/C” may mean “at least one of A,B, and/or C.”

Further, in the document, the term “or” should be interpreted toindicate “and/or.” For instance, the expression “A or B” may comprise 1)only A, 2) only B, and/or 3) both A and B. In other words, the term “or”in this document should be interpreted to indicate “additionally oralternatively.”

In the present specification, “at least one of A and B” may mean “onlyA”, “only B”, or “both A and B”. Further, in the present specification,the expression “at least one of A or B” or “at least one of A and/or B”may be interpreted the same as “at least one of A and B”.

Further, in the present specification, “at least one of A, B and C” maymean “only A”, “only B”, “only C”, or “any combination of A, B and C”.Further, “at least one of A, B or C” or “at least one of A, B and/or C”may mean “at least one of A, B and C”.

Further, the parentheses used in the present specification may mean “forexample”. Specifically, in the case that “prediction (intra prediction)”is expressed, it may be indicated that “intra prediction” is proposed asan example of “prediction”. In other words, the term “prediction” in thepresent specification is not limited to “intra prediction”, and it maybe indicated that “intra prediction” is proposed as an example of“prediction”. Further, even in the case that “prediction (i.e., intraprediction)” is expressed, it may be indicated that “intra prediction”is proposed as an example of “prediction”.

In the present specification, technical features individually explainedin one drawing may be individually implemented, or may be simultaneouslyimplemented.

FIG. 1 illustrates an example of a video/image coding system to whichthe disclosure of the present document may be applied.

Referring to FIG. 1 , a video/image coding system may include a sourcedevice and a reception device. The source device may transmit encodedvideo/image information or data to the reception device through adigital storage medium or network in the form of a file or streaming

The source device may include a video source, an encoding apparatus, anda transmitter. The receiving device may include a receiver, a decodingapparatus, and a renderer. The encoding apparatus may be called avideo/image encoding apparatus, and the decoding apparatus may be calleda video/image decoding apparatus. The transmitter may be included in theencoding apparatus. The receiver may be included in the decodingapparatus. The renderer may include a display, and the display may beconfigured as a separate device or an external component.

The video source may acquire video/image through a process of capturing,synthesizing, or generating the video/image. The video source mayinclude a video/image capture device and/or a video/image generatingdevice. The video/image capture device may include, for example, one ormore cameras, video/image archives including previously capturedvideo/images, and the like. The video/image generating device mayinclude, for example, computers, tablets and smartphones, and may(electronically) generate video/images. For example, a virtualvideo/image may be generated through a computer or the like. In thiscase, the video/image capturing process may be replaced by a process ofgenerating related data.

The encoding apparatus may encode input video/image. The encodingapparatus may perform a series of procedures such as prediction,transform, and quantization for compaction and coding efficiency. Theencoded data (encoded video/image information) may be output in the formof a bitstream.

The transmitter may transmit the encoded image/image information or dataoutput in the form of a bitstream to the receiver of the receivingdevice through a digital storage medium or a network in the form of afile or streaming. The digital storage medium may include variousstorage mediums such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, and thelike. The transmitter may include an element for generating a media filethrough a predetermined file format and may include an element fortransmission through a broadcast/communication network. The receiver mayreceive/extract the bitstream and transmit the received bitstream to thedecoding apparatus.

The decoding apparatus may decode the video/image by performing a seriesof procedures such as dequantization, inverse transform, and predictioncorresponding to the operation of the encoding apparatus.

The renderer may render the decoded video/image. The renderedvideo/image may be displayed through the display.

FIG. 2 is a diagram schematically illustrating the configuration of avideo/image encoding apparatus to which the disclosure of the presentdocument may be applied. Hereinafter, what is referred to as the videoencoding apparatus may include an image encoding apparatus.

Referring to FIG. 2 , the encoding apparatus 200 may include and beconfigured with an image partitioner 210, a predictor 220, a residualprocessor 230, an entropy encoder 240, an adder 250, a filter 260, and amemory 270. The predictor 220 may include an inter predictor 221 and anintra predictor 222. The residual processor 230 may include atransformer 232, a quantizer 233, a dequantizer 234, and an inversetransformer 235. The residual processor 230 may further include asubtractor 231. The adder 250 may be called a reconstructor orreconstructed block generator. The image partitioner 210, the predictor220, the residual processor 230, the entropy encoder 240, the adder 250,and the filter 260, which have been described above, may be configuredby one or more hardware components (e.g., encoder chipsets orprocessors) according to an embodiment. In addition, the memory 270 mayinclude a decoded picture buffer (DPB), and may also be configured by adigital storage medium. The hardware component may further include thememory 270 as an internal/external component.

The image partitioner 210 may split an input image (or, picture, frame)input to the encoding apparatus 200 into one or more processing units.As an example, the processing unit may be called a coding unit (CU). Inthis case, the coding unit may be recursively split according to aQuad-tree binary-tree ternary-tree (QTBTTT) structure from a coding treeunit (CTU) or the largest coding unit (LCU). For example, one codingunit may be split into a plurality of coding units of a deeper depthbased on a quad-tree structure, a binary-tree structure, and/or aternary-tree structure. In this case, for example, the quad-treestructure is first applied and the binary-tree structure and/or theternary-tree structure may be later applied. Alternatively, thebinary-tree structure may also be first applied. A coding procedureaccording to the present disclosure may be performed based on a finalcoding unit which is not split any more. In this case, based on codingefficiency according to image characteristics or the like, the maximumcoding unit may be directly used as the final coding unit, or asnecessary, the coding unit may be recursively split into coding units ofa deeper depth, such that a coding unit having an optimal size may beused as the final coding unit. Here, the coding procedure may include aprocedure such as prediction, transform, and reconstruction to bedescribed later. As another example, the processing unit may furtherinclude a prediction unit (PU) or a transform unit (TU). In this case,each of the prediction unit and the transform unit may be split orpartitioned from the aforementioned final coding unit. The predictionunit may be a unit of sample prediction, and the transform unit may be aunit for inducing a transform coefficient and/or a unit for inducing aresidual signal from the transform coefficient.

The unit may be interchangeably used with the term such as a block or anarea in some cases. Generally, an M×N block may represent samplescomposed of M columns and N rows or a group of transform coefficients.The sample may generally represent a pixel or a value of the pixel, andmay also represent only the pixel/pixel value of a luma component, andalso represent only the pixel/pixel value of a chroma component. Thesample may be used as the term corresponding to a pixel or a pelconfiguring one picture (or image).

The subtractor 231 may generate a residual signal (residual block,residual samples, or residual sample array) by subtracting a predictionsignal (predicted block, prediction samples, or prediction sample array)output from the predictor 220 from an input image signal (originalblock, original samples, or original sample array), and the generatedresidual signal is transmitted to the transformer 232. The predictor 220may perform prediction for a processing target block (hereinafter,referred to as a “current block”), and generate a predicted blockincluding prediction samples for the current block. The predictor 220may determine whether intra prediction or inter prediction is applied ona current block or in a CU unit. As described later in the descriptionof each prediction mode, the predictor may generate various kinds ofinformation related to prediction, such as prediction mode information,and transfer the generated information to the entropy encoder 240. Theinformation on the prediction may be encoded in the entropy encoder 240and output in the form of a bitstream.

The intra predictor 222 may predict a current block with reference tosamples within a current picture. The referenced samples may be locatedneighboring to the current block, or may also be located away from thecurrent block according to the prediction mode. The prediction modes inthe intra prediction may include a plurality of non-directional modesand a plurality of directional modes. The non-directional mode mayinclude, for example, a DC mode or a planar mode. The directional modemay include, for example, 33 directional prediction modes or 65directional prediction modes according to the fine degree of theprediction direction. However, this is illustrative and the directionalprediction modes which are more or less than the above number may beused according to the setting. The intra predictor 222 may alsodetermine the prediction mode applied to the current block using theprediction mode applied to the neighboring block.

The inter predictor 221 may induce a predicted block of the currentblock based on a reference block (reference sample array) specified by amotion vector on a reference picture. At this time, in order to decreasethe amount of motion information transmitted in the inter predictionmode, the motion information may be predicted in units of a block, asub-block, or a sample based on the correlation of the motioninformation between the neighboring block and the current block. Themotion information may include a motion vector and a reference pictureindex. The motion information may further include inter predictiondirection (L0 prediction, L1 prediction, Bi prediction, or the like)information. In the case of the inter prediction, the neighboring blockmay include a spatial neighboring block existing within the currentpicture and a temporal neighboring block existing in the referencepicture. The reference picture including the reference block and thereference picture including the temporal neighboring block may also bethe same as each other, and may also be different from each other. Thetemporal neighboring block may be called the name such as a collocatedreference block, a collocated CU (colCU), or the like, and the referencepicture including the temporal neighboring block may also be called acollocated picture (colPic). For example, the inter predictor 221 mayconfigure a motion information candidate list based on the neighboringblocks, and generate information indicating what candidate is used toderive the motion vector and/or the reference picture index of thecurrent block. The inter prediction may be performed based on variousprediction modes, and for example, in the case of a skip mode and amerge mode, the inter predictor 221 may use the motion information ofthe neighboring block as the motion information of the current block. Inthe case of the skip mode, the residual signal may not be transmittedunlike the merge mode. A motion vector prediction (MVP) mode mayindicate the motion vector of the current block by using the motionvector of the neighboring block as a motion vector predictor, andsignaling a motion vector difference.

The predictor 220 may generate a prediction signal based on variousprediction methods described below. For example, the predictor may notonly apply intra prediction or inter prediction to predict one block butalso simultaneously apply both intra prediction and inter prediction.This may be called combined inter and intra prediction (CIIP). Inaddition, the predictor may perform an intra block copy (IBC) forprediction of a block. The intra block copy may be used for contentimage/moving image coding of a game or the like, for example, screencontent coding (SCC). The IBC basically performs prediction in thecurrent picture, but may be performed similarly to inter prediction inthat a reference block is derived in the current picture. That is, theIBC may use at least one of inter prediction techniques described in thepresent document.

The prediction signal generated through the inter predictor 221 and/orthe intra predictor 222 may be used to generate a reconstructed signalor to generate a residual signal. The transformer 232 may generatetransform coefficients by applying a transform technique to the residualsignal. For example, the transform technique may include at least one ofa discrete cosine transform (DCT), a discrete sine transform (DST), agraph-based transform (GBT), or a conditionally non-linear transform(CNT). Here, the GBT means transform obtained from a graph whenrelationship information between pixels is represented by the graph. TheCNT refers to the transform obtained based on a prediction signalgenerated using all previously reconstructed pixels. In addition, thetransform process may be applied to square pixel blocks having the samesize, or may be applied to blocks having a variable size rather than asquare.

The quantizer 233 may quantize the transform coefficients and transmitthem to the entropy encoder 240, and the entropy encoder 240 may encodethe quantized signal (information on the quantized transformcoefficients) and output a bitstream. The information on the quantizedtransform coefficients may be referred to as residual information. Thequantizer 233 may rearrange block type quantized transform coefficientsinto a one-dimensional vector form based on a coefficient scanningorder, and generate information on the quantized transform coefficientsbased on the quantized transform coefficients in the one-dimensionalvector form. The entropy encoder 240 may perform various encodingmethods such as, for example, exponential Golomb, context-adaptivevariable length coding (CAVLC), context-adaptive binary arithmeticcoding (CABAC), and the like. The entropy encoder 240 may encodeinformation necessary for video/image reconstruction together with orseparately from the quantized transform coefficients (e.g., values ofsyntax elements and the like). Encoded information (e.g., encodedvideo/image information) may be transmitted or stored in the unit of anetwork abstraction layer (NAL) in the form of a bitstream. Thevideo/image information may further include information on variousparameter sets, such as an adaptation parameter set (APS), a pictureparameter set (PPS), a sequence parameter set (SPS), or a videoparameter set (VPS). In addition, the video/image information mayfurther include general constraint information. In the present document,information and/or syntax elements being signaled/transmitted to bedescribed later may be encoded through the above-described encodingprocedure, and be included in the bitstream. The bitstream may betransmitted through a network, or may be stored in a digital storagemedium. Here, the network may include a broadcasting network and/or acommunication network, and the digital storage medium may includevarious storage media, such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, andthe like. A transmitter (not illustrated) transmitting a signal outputfrom the entropy encoder 240 and/or a storage unit (not illustrated)storing the signal may be configured as an internal/external element ofthe encoding apparatus 200, and alternatively, the transmitter may beincluded in the entropy encoder 240.

The quantized transform coefficients output from the quantizer 233 maybe used to generate a prediction signal. For example, the residualsignal (residual block or residual samples) may be reconstructed byapplying dequantization and inverse transform to the quantized transformcoefficients through the dequantizer 234 and the inverse transformer235. The adder 250 adds the reconstructed residual signal to theprediction signal output from the predictor 220 to generate areconstructed signal (reconstructed picture, reconstructed block,reconstructed samples, or reconstructed sample array). If there is noresidual for the processing target block, such as a case that a skipmode is applied, the predicted block may be used as the reconstructedblock. The generated reconstructed signal may be used for intraprediction of a next processing target block in the current picture, andmay be used for inter prediction of a next picture through filtering asdescribed below.

Meanwhile, luma mapping with chroma scaling (LMCS) may be applied duringa picture encoding and/or reconstruction process.

The filter 260 may improve subjective/objective image quality byapplying filtering to the reconstructed signal. For example, the filter260 may generate a modified reconstructed picture by applying variousfiltering methods to the reconstructed picture, and store the modifiedreconstructed picture in the memory 270, specifically, in a DPB of thememory 270. The various filtering methods may include, for example,deblocking filtering, a sample adaptive offset (SAO), an adaptive loopfilter, a bilateral filter, and the like. The filter 260 may generatevarious kinds of information related to the filtering, and transfer thegenerated information to the entropy encoder 290 as described later inthe description of each filtering method. The information related to thefiltering may be encoded by the entropy encoder 290 and output in theform of a bitstream.

The modified reconstructed picture transmitted to the memory 270 may beused as a reference picture in the inter predictor 221. When the interprediction is applied through the encoding apparatus, predictionmismatch between the encoding apparatus 200 and the decoding apparatuscan be avoided and encoding efficiency can be improved.

The DPB of the memory 270 may store the modified reconstructed picturefor use as the reference picture in the inter predictor 221. The memory270 may store motion information of a block from which the motioninformation in the current picture is derived (or encoded) and/or motioninformation of blocks in the picture, having already been reconstructed.The stored motion information may be transferred to the inter predictor221 to be utilized as motion information of the spatial neighboringblock or motion information of the temporal neighboring block. Thememory 270 may store reconstructed samples of reconstructed blocks inthe current picture, and may transfer the reconstructed samples to theintra predictor 222.

FIG. 3 is a diagram for schematically explaining the configuration of avideo/image decoding apparatus to which the disclosure of the presentdocument may be applied.

Referring to FIG. 3 , the decoding apparatus 300 may include andconfigured with an entropy decoder 310, a residual processor 320, apredictor 330, an adder 340, a filter 350, and a memory 360. Thepredictor 330 may include an inter predictor 331 and an intra predictor332. The residual processor 320 may include a dequantizer 321 and aninverse transformer 322. The entropy decoder 310, the residual processor320, the predictor 330, the adder 340, and the filter 350, which havebeen described above, may be configured by one or more hardwarecomponents (e.g., decoder chipsets or processors) according to anembodiment. Further, the memory 360 may include a decoded picture buffer(DPB), and may be configured by a digital storage medium. The hardwarecomponent may further include the memory 360 as an internal/externalcomponent.

When the bitstream including the video/image information is input, thedecoding apparatus 300 may reconstruct the image in response to aprocess in which the video/image information is processed in theencoding apparatus illustrated in FIG. 2 . For example, the decodingapparatus 300 may derive the units/blocks based on block split-relatedinformation acquired from the bitstream. The decoding apparatus 300 mayperform decoding using the processing unit applied to the encodingapparatus. Therefore, the processing unit for the decoding may be, forexample, a coding unit, and the coding unit may be split according tothe quad-tree structure, the binary-tree structure, and/or theternary-tree structure from the coding tree unit or the maximum codingunit. One or more transform units may be derived from the coding unit.In addition, the reconstructed image signal decoded and output throughthe decoding apparatus 300 may be reproduced through a reproducingapparatus.

The decoding apparatus 300 may receive a signal output from the encodingapparatus of FIG. 2 in the form of a bitstream, and the received signalmay be decoded through the entropy decoder 310. For example, the entropydecoder 310 may parse the bitstream to derive information (e.g.,video/image information) necessary for image reconstruction (or picturereconstruction). The video/image information may further includeinformation on various parameter sets such as an adaptation parameterset (APS), a picture parameter set (PPS), a sequence parameter set(SPS), or a video parameter set (VPS). In addition, the video/imageinformation may further include general constraint information. Thedecoding apparatus may further decode picture based on the informationon the parameter set and/or the general constraint information.Signaled/received information and/or syntax elements described later inthis document may be decoded may decode the decoding procedure andobtained from the bitstream. For example, the entropy decoder 310decodes the information in the bitstream based on a coding method suchas exponential Golomb coding, CAVLC, or CABAC, and output syntaxelements required for image reconstruction and quantized values oftransform coefficients for residual. More specifically, the CABACentropy decoding method may receive a bin corresponding to each syntaxelement in the bitstream, determine a context model by using a decodingtarget syntax element information, decoding information of a decodingtarget block or information of a symbol/bin decoded in a previous stage,and perform an arithmetic decoding on the bin by predicting aprobability of occurrence of a bin according to the determined contextmodel, and generate a symbol corresponding to the value of each syntaxelement. In this case, the CABAC entropy decoding method may update thecontext model by using the information of the decoded symbol/bin for acontext model of a next symbol/bin after determining the context model.The information related to the prediction among the information decodedby the entropy decoder 310 may be provided to the predictor 330, andinformation on the residual on which the entropy decoding has beenperformed in the entropy decoder 310, that is, the quantized transformcoefficients and related parameter information, may be input to thedequantizer 321. In addition, information on filtering among informationdecoded by the entropy decoder 310 may be provided to the filter 350.Meanwhile, a receiver (not illustrated) for receiving a signal outputfrom the encoding apparatus may be further configured as aninternal/external element of the decoding apparatus 300, or the receivermay be a constituent element of the entropy decoder 310. Meanwhile, thedecoding apparatus according to the present document may be referred toas a video/image/picture decoding apparatus, and the decoding apparatusmay be classified into an information decoder (video/image/pictureinformation decoder) and a sample decoder (video/image/picture sampledecoder). The information decoder may include the entropy decoder 310,and the sample decoder may include at least one of the dequantizer 321,the inverse transformer 322, the predictor 330, the adder 340, thefilter 350, and the memory 360.

The dequantizer 321 may dequantize the quantized transform coefficientsto output the transform coefficients. The dequantizer 321 may rearrangethe quantized transform coefficients in a two-dimensional block form. Inthis case, the rearrangement may be performed based on a coefficientscan order performed by the encoding apparatus. The dequantizer 321 mayperform dequantization for the quantized transform coefficients using aquantization parameter (e.g., quantization step size information), andacquire the transform coefficients.

The inverse transformer 322 inversely transforms the transformcoefficients to acquire the residual signal (residual block, residualsample array).

The predictor 330 may perform the prediction of the current block, andgenerate a predicted block including the prediction samples of thecurrent block. The predictor may determine whether the intra predictionis applied or the inter prediction is applied to the current block basedon the information about prediction output from the entropy decoder 310,and determine a specific intra/inter prediction mode.

The predictor may generate a prediction signal based on variousprediction methods described below. For example, the predictor may notonly apply intra prediction or inter prediction to predict one block butalso simultaneously apply intra prediction and inter prediction. Thismay be called combined inter and intra prediction (CIIP). In addition,the predictor may perform an intra block copy (IBC) for prediction of ablock. The intra block copy may be used for content image/moving imagecoding of a game or the like, for example, screen content coding (SCC).The IBC basically performs prediction in the current picture, but may beperformed similarly to inter prediction in that a reference block isderived in the current picture. That is, the IBC may use at least one ofinter prediction techniques described in the present document.

The intra predictor 332 may predict the current block by referring tothe samples in the current picture. The referred samples may be locatedin the neighborhood of the current block, or may be located apart fromthe current block according to the prediction mode. In intra prediction,prediction modes may include a plurality of non-directional modes and aplurality of directional modes. The intra predictor 332 may determinethe prediction mode to be applied to the current block by using theprediction mode applied to the neighboring block.

The inter predictor 331 may derive a predicted block for the currentblock based on a reference block (reference sample array) specified by amotion vector on a reference picture. In this case, in order to reducethe amount of motion information being transmitted in the interprediction mode, motion information may be predicted in the unit ofblocks, subblocks, or samples based on correlation of motion informationbetween the neighboring block and the current block. The motioninformation may include a motion vector and a reference picture index.The motion information may further include information on interprediction direction (L0 prediction, L1 prediction, Bi prediction, andthe like). In case of inter prediction, the neighboring block mayinclude a spatial neighboring block existing in the current picture anda temporal neighboring block existing in the reference picture. Forexample, the inter predictor 331 may construct a motion informationcandidate list based on neighboring blocks, and derive a motion vectorof the current block and/or a reference picture index based on thereceived candidate selection information. Inter prediction may beperformed based on various prediction modes, and the information on theprediction may include information indicating a mode of inter predictionfor the current block.

The adder 340 may generate a reconstructed signal (reconstructedpicture, reconstructed block, or reconstructed sample array) by addingthe obtained residual signal to the prediction signal (predicted blockor predicted sample array) output from the predictor 330. If there is noresidual for the processing target block, such as a case that a skipmode is applied, the predicted block may be used as the reconstructedblock.

The adder 340 may be called a reconstructor or a reconstructed blockgenerator. The generated reconstructed signal may be used for the intraprediction of a next block to be processed in the current picture, andas described later, may also be output through filtering or may also beused for the inter prediction of a next picture.

Meanwhile, a luma mapping with chroma scaling (LMCS) may also be appliedin the picture decoding process.

The filter 350 may improve subjective/objective image quality byapplying filtering to the reconstructed signal. For example, the filter350 may generate a modified reconstructed picture by applying variousfiltering methods to the reconstructed picture, and store the modifiedreconstructed picture in the memory 360, specifically, in a DPB of thememory 360. The various filtering methods may include, for example,deblocking filtering, a sample adaptive offset, an adaptive loop filter,a bilateral filter, and the like.

The (modified) reconstructed picture stored in the DPB of the memory 360may be used as a reference picture in the inter predictor 331. Thememory 360 may store the motion information of the block from which themotion information in the current picture is derived (or decoded) and/orthe motion information of the blocks in the picture having already beenreconstructed. The stored motion information may be transferred to theinter predictor 331 so as to be utilized as the motion information ofthe spatial neighboring block or the motion information of the temporalneighboring block. The memory 360 may store reconstructed samples ofreconstructed blocks in the current picture, and transfer thereconstructed samples to the intra predictor 332.

In the present specification, the embodiments described in the predictor330, the dequantizer 321, the inverse transformer 322, and the filter350 of the decoding apparatus 300 may also be applied in the same manneror corresponding to the predictor 220, the dequantizer 234, the inversetransformer 235, and the filter 260 of the encoding apparatus 200.

Meanwhile, as described above, in performing video coding, prediction isperformed to improve compression efficiency. Through this, a predictedblock including prediction samples for a current block as a block to becoded (i.e., a coding target block) may be generated. Here, thepredicted block includes prediction samples in a spatial domain (orpixel domain). The predicted block is derived in the same manner in anencoding apparatus and a decoding apparatus, and the encoding apparatusmay signal information (residual information) on residual between theoriginal block and the predicted block, rather than an original samplevalue of an original block, to the decoding apparatus, therebyincreasing image coding efficiency. The decoding apparatus may derive aresidual block including residual samples based on the residualinformation, add the residual block and the predicted block to generatereconstructed blocks including reconstructed samples, and generate areconstructed picture including the reconstructed blocks.

The residual information may be generated through a transform andquantization procedure. For example, the encoding apparatus may derive aresidual block between the original block and the predicted block,perform a transform procedure on residual samples (residual samplearray) included in the residual block to derive transform coefficients,perform a quantization procedure on the transform coefficients to derivequantized transform coefficients, and signal related residualinformation to the decoding apparatus (through a bit stream). Here, theresidual information may include value information of the quantizedtransform coefficients, location information, a transform technique, atransform kernel, a quantization parameter, and the like. The decodingapparatus may perform dequantization/inverse transform procedure basedon the residual information and derive residual samples (or residualblocks). The decoding apparatus may generate a reconstructed picturebased on the predicted block and the residual block. Also, for referencefor inter prediction of a picture afterward, the encoding apparatus mayalso dequantize/inverse-transform the quantized transform coefficientsto derive a residual block and generate a reconstructed picture basedthereon.

In this document, at least one of quantization/dequantization and/ortransform/inverse transform may be omitted. When thequantization/dequantization is omitted, the quantized transformcoefficient may be referred to as a transform coefficient. When thetransform/inverse transform is omitted, the transform coefficient may becalled a coefficient or a residual coefficient or may still be calledthe transform coefficient for uniformity of expression.

In this document, the quantized transform coefficient and the transformcoefficient may be referred to as a transform coefficient and a scaledtransform coefficient, respectively. In this case, the residualinformation may include information on transform coefficient(s), and theinformation on the transform coefficient(s) may be signaled throughresidual coding syntax. Transform coefficients may be derived based onthe residual information (or information on the transformcoefficient(s)), and scaled transform coefficients may be derivedthrough inverse transform (scaling) on the transform coefficients.Residual samples may be derived based on inverse transform (transform)of the scaled transform coefficients. This may be applied/expressed inother parts of this document as well.

The predictor of the encoding apparatus/decoding apparatus may deriveprediction samples by performing inter prediction in units of blocks.Inter prediction can be a prediction derived in a manner that isdependent on data elements (e.g. sample values or motion information,etc) of picture(s) other than the current picture. When the interprediction is applied to the current block, based on the reference block(reference sample arrays) specified by the motion vector on thereference picture pointed to by the reference picture index, thepredicted block (prediction sample arrays) for the current block can bederived. In this case, in order to reduce the amount of motioninformation transmitted in the inter prediction mode, the motioninformation of the current block may be predicted in units of blocks,subblocks, or samples based on the correlation between the motioninformation between neighboring blocks and the current block. The motioninformation may include the motion vector and the reference pictureindex. The motion information may further include inter prediction type(L0 prediction, L1 prediction, Bi prediction, etc.) information. Whenthe inter prediction is applied, the neighboring blocks may include aspatial neighboring block existing in the current picture and a temporalneighboring block existing in the reference picture. The referencepicture including the reference block and the reference pictureincluding the temporal neighboring block may be the same or different.The temporal neighboring block may be called a collocated referenceblock, a collocated CU (colCU), etc., and a reference picture includingthe temporally neighboring block may be called a collocated picture(colPic). For example, a motion information candidate list may beconstructed based on neighboring blocks of the current block, and a flagor index information indicating which candidate is selected (used) toderive the motion vector and/or the reference picture index of thecurrent block may be signaled. The inter prediction may be performedbased on various prediction modes. For example, in the skip mode and themerge mode, the motion information of the current block may be the sameas the motion information of a selected neighboring block. In the skipmode, unlike the merge mode, a residual signal may not be transmitted.In the case of a motion vector prediction (MVP) mode, a motion vector ofa selected neighboring block may be used as a motion vector predictor,and a motion vector difference may be signaled. In this case, the motionvector of the current block may be derived using the sum of the motionvector predictor and the motion vector difference.

The motion information may include L0 motion information and/or L1motion information according to an inter prediction type (L0 prediction,L1 prediction, Bi prediction, etc.). A motion vector in the L0 directionmay be referred to as an L0 motion vector or MVL0, and a motion vectorin the L1 direction may be referred to as an L1 motion vector or MVL1.The prediction based on the L0 motion vector may be called L0prediction, the prediction based on the L1 motion vector may be calledthe L1 prediction, and the prediction based on both the L0 motion vectorand the L1 motion vector may be called a bi-prediction. Here, the L0motion vector may indicate a motion vector associated with the referencepicture list L0 (L0), and the L1 motion vector may indicate a motionvector associated with the reference picture list L1 (L1). The referencepicture list L0 may include pictures that are previous than the currentpicture in output order as reference pictures, and the reference picturelist L1 may include pictures that are subsequent than the currentpicture in output order. The previous pictures may be called forward(reference) pictures, and the subsequent pictures may be called backward(reference) pictures. The reference picture list L0 may further includepictures that are subsequent than the current picture in output order asreference pictures. In this case, the previous pictures may be indexedfirst, and the subsequent pictures may be indexed next in the referencepicture list L0. The reference picture list L1 may further includepictures previous than the current picture in output order as referencepictures. In this case, the subsequent pictures may be indexed first inthe reference picture list 1 and the previous pictures may be indexednext. Here, the output order may correspond to a picture order count(POC) order.

FIG. 4 exemplarily shows a hierarchical structure for a codedimage/video.

Referring to FIG. 4 , the coded image/video is divided into VCL (videocoding layer) that deals with an image/video decoding process anditself, a subsystem that transmits and stores the coded information, anda network abstraction layer (NAL) that exists between the VCL andsubsystems and is responsible for network adaptation functions.

The VCL may generate VCL data including compressed image data (slicedata), or generate parameter sets including a picture parameter set(Picture Parameter Set: PPS), a sequence parameter set (SequenceParameter Set: SPS), a video parameter set (Video Parameter Set: VPS)etc. or a supplemental enhancement information (SEI) messageadditionally necessary for the decoding process of an image.

In the NAL, a NAL unit may be generated by adding header information(NAL unit header) to a raw byte sequence payload (RBSP) generated in theVCL. In this case, the RBSP refers to slice data, parameter sets, SEImessages, etc. generated in the VCL. The NAL unit header may include NALunit type information specified according to RBSP data included in thecorresponding NAL unit.

As shown in the figure, the NAL unit may be divided into a VCL NAL unitand a Non-VCL NAL unit according to the RBSP generated in the VCL. TheVCL NAL unit may mean a NAL unit including information (sliced data)about an image, and the Non-VCL NAL unit may mean a NAL unit containinginformation (parameter set or SEI message) necessary for decoding animage.

The above-described VCL NAL unit and Non-VCL NAL unit may be transmittedthrough a network by attaching header information according to a datastandard of the subsystem. For example, the NAL unit may be transformedinto a data form of a predetermined standard such as H.266/VVC fileformat, Real-time Transport Protocol (RTP), Transport Stream (TS), etc.and transmitted through various networks.

As described above, in the NAL unit, the NAL unit type may be specifiedaccording to the RBSP data structure included in the corresponding NALunit, and information on this NAL unit type may be stored and signaledin the NAL unit header.

For example, the NAL unit may be roughly classified into the VCL NALunit type and the Non-VCL NAL unit type depending on whether the NALunit includes information about the image (slice data). The VCL NAL unittype may be classified according to property and a type of a pictureincluded in the VCL NAL unit, and the Non-VCL NAL unit type may beclassified according to the type of a parameter set.

The following is an example of the NAL unit type specified according tothe type of parameter set included in the Non-VCL NAL unit type.

-   -   APS (Adaptation Parameter Set) NAL unit: Type for NAL unit        including APS    -   DPS (Decoding Parameter Set) NAL unit: Type for NAL unit        including DPS    -   VPS (Video Parameter Set) NAL unit: Type for NAL unit including        VPS    -   SPS (Sequence Parameter Set) NAL unit: Type for NAL unit        including SPS    -   PPS (Picture Parameter Set) NAL unit: Type for NAL unit        including PPS    -   PH (Picture header) NAL unit: Type for NAL unit including PH

The above-described NAL unit types have syntax information for the NALunit type, and the syntax information may be stored and signaled in theNAL unit header. For example, the syntax information may benal_unit_type, and NAL unit types may be specified by a nal_unit_typevalue.

Meanwhile, as described above, one picture may include a plurality ofslices, and one slice may include a slice header and slice data. In thiscase, one picture header may be further added to a plurality of slices(a slice header and a slice data set) in one picture. The picture header(picture header syntax) may include information/parameters commonlyapplicable to the picture. In this document, a slice may be mixed orreplaced with a tile group. Also, in this document, a slice header maybe mixed or replaced with a type group header.

The slice header (slice header syntax or slice header information) mayinclude information/parameters commonly applicable to the slice. The APS(APS syntax) or PPS (PPS syntax) may include information/parameterscommonly applicable to one or more slices or pictures. The SPS (SPSsyntax) may include information/parameters commonly applicable to one ormore sequences. The VPS (VPS syntax) may include information/parameterscommonly applicable to multiple layers. The DPS (DPS syntax) may includeinformation/parameters commonly applicable to the entire video. The DPSmay include information/parameters related to concatenation of a codedvideo sequence (CVS). In this document, high level syntax (HLS) mayinclude at least one of the APS syntax, PPS syntax, SPS syntax, VPSsyntax, DPS syntax, picture header syntax, and slice header syntax.

In this document, the image/video information encoded in the encodingapparatus and signaled in the form of a bitstream to the decodingapparatus may include, as well as picture partitioning-relatedinformation in the picture, intra/inter prediction information, residualinformation, in-loop filtering information, etc. the informationincluded in the slice header, the information included in the pictureheader, the information included in the APS, the information included inthe PPS, the information included in the SPS, the information includedin the VPS, and/or the information included in the DPS. In addition, theimage/video information may further include information of the NAL unitheader.

Meanwhile, in order to compensate for a difference between an originalimage and a reconstructed image due to an error occurring in acompression encoding procedure such as quantization, an in-loopfiltering procedure may be performed on reconstructed samples orreconstructed pictures as described above. As described above, thein-loop filtering may be performed by the filter of the encodingapparatus and the filter of the decoding apparatus, and a deblockingfilter, SAO, and/or adaptive loop filter (ALF) may be applied. Forexample, the ALF procedure may be performed after the deblockingfiltering procedure and/or the SAO procedure are complete. However, evenin this case, the deblocking filtering procedure and/or the SAOprocedure may be omitted.

Hereinafter, picture reconstruction and filtering will be described indetail. In image/video coding, a reconstructed block may be generatedbased on intra prediction/inter prediction in each block unit, and areconstructed picture including the reconstructed blocks may begenerated. When the current picture/slice is an I picture/slice, blocksincluded in the current picture/slice may be reconstructed based on onlyintra prediction. Meanwhile, when the current picture/slice is a P or Bpicture/slice, blocks included in the current picture/slice may bereconstructed based on intra prediction or inter prediction. In thiscase, intra prediction may be applied to some blocks in the currentpicture/slice, and inter prediction may be applied to the remainingblocks.

The intra prediction may refer to prediction which generates predictionsamples for the current block based on reference samples in a picture towhich the current block belongs (hereinafter, referred to as a currentpicture). When the intra prediction is applied to the current block,neighboring reference samples to be used for the intra prediction of thecurrent block may be derived. The neighboring reference samples of thecurrent block may include samples adjacent to the left boundary of thecurrent block having a size of nW×nH and a total of 2×nH samplesneighboring the bottom-left, samples adjacent to the top boundary of thecurrent block and a total of 2×nW samples neighboring the top-right, andone sample neighboring the top-left of the current block. Alternatively,the neighboring reference samples of the current block may include aplurality of columns of upper neighboring samples and a plurality ofrows of left neighboring samples. In addition, the neighboring referencesamples of the current block may include a total of nH samples adjacentto the right boundary of the current block having a size of nW×nH, atotal of nW samples adjacent to the bottom boundary of the currentblock, and one sample neighboring (bottom-right) neighboringbottom-right of the current block.

However, some of the neighboring reference samples of the current blockmay not be decoded yet or available. In this case, the decoder mayconfigure the neighboring reference samples to be used for prediction bysubstituting not-available samples with the available samples.Alternatively, neighboring reference samples to be used for predictionmay be configured through interpolation of the available samples.

When the neighboring reference samples are derived, (i) the predictionsample may be derived based on the average or interpolation ofneighboring reference samples of the current block, and (ii) theprediction sample may be derived based on the reference sample presentin a specific (prediction) direction for the prediction sample among theperiphery reference samples of the current block. The case of (i) may becalled a non-directional mode or a non-angular mode and the case of (ii)may be called a directional mode or an angular mode. The predictionsample may also be generated through interpolation between the secondneighboring sample and the first neighboring sample located in adirection opposite to the prediction direction of the intra predictionmode of the current block based on the prediction sample of the currentblock among the neighboring reference samples. The above case may bereferred to as linear interpolation intra prediction (LIP). In addition,chroma prediction samples may be generated based on luma samples using alinear model. This case may be called an LM mode. In addition, atemporary prediction sample of the current block may be derived based onfiltered neighboring reference samples, and at least one referencesample derived according to the intra prediction mode among the existingneighboring reference samples, that is, unfiltered neighboring referencesamples, and the temporary prediction sample may be weighted-summed toderive the prediction sample of the current block. The above case may bereferred to as position dependent intra prediction (PDPC). In addition,a reference sample line having the highest prediction accuracy among theneighboring multi-reference sample lines of the current block may beselected to derive the prediction sample by using the reference samplelocated in the prediction direction on the corresponding line, and thenthe reference sample line used herein may be indicated (signaled) to thedecoding apparatus, thereby performing intra-prediction encoding. Theabove case may be referred to as multi-reference line (MRL) intraprediction or MRL based intra prediction. In addition, intra predictionmay be performed based on the same intra prediction mode by dividing thecurrent block into vertical or horizontal subpartitions, and neighboringreference samples may be derived and used in the subpartition unit. Thatis, in this case, the intra prediction mode for the current block isequally applied to the subpartitions, and the intra predictionperformance may be improved in some cases by deriving and using theneighboring reference samples in the subpartition unit. Such aprediction method may be called intra sub-partitions (ISP) or ISP basedintra prediction. The above-described intra prediction methods may becalled an intra prediction type separately from the intra predictionmode in the sections 1.2. The intra prediction type may be called invarious terms such as an intra prediction technique or an additionalintra prediction mode. For example, the intra prediction type (oradditional intra prediction mode) may include at least one of theabove-described LIP, PDPC, MRL, and ISP. A general intra predictionmethod except for the specific intra prediction type such as LIP, PDPC,MRL, or ISP may be called a normal intra prediction type. The normalintra prediction type may be generally applied when the specific intraprediction type is not applied, and prediction may be performed based onthe intra prediction mode described above. Meanwhile, optionally,post-filtering may be performed on the derived predicted sample.

Specifically, the intra prediction procedure may include an intraprediction mode/type determination step, a neighboring reference samplederivation step, and an intra prediction mode/type based predictionsample derivation step. In addition, optionally, a post-filtering stepmay be performed on the derived predicted sample.

A modified reconstructed picture may be generated through the in-loopfiltering procedure, and the modified reconstructed picture may beoutput as a decoded picture at the decoding apparatus and may also bestored in a decoded picture buffer or memory of the encodingapparatus/decoding apparatus and used as a reference picture in theinter prediction procedure at the time of encoding/decoding a picturelater. The in-loop filtering procedure may include a deblockingfiltering procedure, a sample adaptive offset (SAO) procedure, and/or anadaptive loop filter (ALF) procedure as described above. In this case,one or some of the deblocking filtering procedure, sample adaptiveoffset (SAO) procedure, adaptive loop filter (ALF) procedure, andbilateral filter procedure may be sequentially applied or all of themmay be sequentially applied. For example, the SAO procedure may beperformed after the deblocking filtering procedure is applied to thereconstructed picture. Alternatively, for example, the ALF procedure maybe performed after the deblocking filtering procedure is applied to thereconstructed picture. This may also be performed in the encodingapparatus.

The deblocking filtering is a filtering scheme which removes distortionat boundaries between blocks in the reconstructed picture. Thedeblocking filtering procedure may, for example, derive a targetboundary from the reconstructed picture, determine a boundary strength(bS) for the target boundary, and perform deblocking filtering on thetarget boundary based on the bS. The bS may be determined based on aprediction mode, a motion vector difference, whether a reference pictureis the same, whether a non-zero significant coefficient exists, etc., oftwo blocks adjacent to the target boundary.

The SAO is a scheme which compensates for an offset difference betweenthe reconstructed picture and the original picture on a sample basis.For example, the SAO may be applied based on a type such as a bandoffset, an edge offset, or the like. According to the SAO, samples maybe classified into different categories according to each SAO type, andan offset value may be added to each sample based on the category. Thefiltering information for the SAO may include information on whether theSAO is applied, SAO type information, and SAO offset value information.The SAO may be applied to the reconstructed picture after the deblockingfiltering is applied.

The adaptive loop filter (ALF) is a scheme which filters a reconstructedpicture on a sample basis based on filter coefficients according to afilter shape. The encoding apparatus may determine whether to apply theALF, an ALF shape and/or an ALF filtering coefficient, etc. by comparingthe reconstructed picture and the original picture and may signal thedetermination result to the decoding apparatus. That is, the filteringinformation for the ALF may include information on whether the ALF isapplied, ALF filter shape information, ALF filtering coefficientinformation, and the like. The ALF may be applied to the reconstructedpicture after the deblocking filtering is applied.

FIG. 5 is a flowchart illustrating an encoding method based on filteringin an encoding apparatus. The method of FIG. 5 may include steps S500 toS530.

In the step S500, the encoding apparatus may generate a reconstructedpicture. The step S500 may be performed based on the aforementionedreconstructed picture (or reconstructed samples) generation procedure.

In the step S510, the encoding apparatus may determine whether in-loopfiltering is applied (across a virtual boundary) based on in-loopfiltering-related information. Herein, the in-loop filtering may includeat least one of the aforementioned de-blocking filtering, SAO, or ALF.

In the step S520, the encoding apparatus may generate a modifiedreconstructed picture (modified reconstructed samples) based on thedetermination of the step S510. Herein, the modified reconstructedpicture (modified reconstructed samples) may be a filtered reconstructedpicture (filtered reconstructed samples).

In the step S530, the encoding apparatus may encode image/videoinformation including the in-loop filtering-related information, basedon the in-loop filtering procedure.

FIG. 6 is a flowchart illustrating a decoding method based on filteringin a decoding apparatus. The method of FIG. 6 may include steps S600 toS630.

In the step S600, the decoding apparatus may obtain image/videoinformation including in-loop filtering-related information from abitstream. Herein, the bitstream may be based on encoded image/videoinformation transmitted from the encoding apparatus.

In the step S610, the decoding apparatus may generate a reconstructedpicture. The step S610 may be performed based on the aforementionedreconstructed picture (or reconstructed samples).

In the step S620, the decoding apparatus may determine whether in-loopfiltering is applied (across a virtual boundary) based on the in-loopfiltering-related information. Herein, the in-loop filtering may includeat least one of the aforementioned de-blocking filtering, SAO, or ALF.

In the step S630, the decoding apparatus may generate a modifiedreconstructed picture (modified reconstructed samples) based on thedetermination of the step S620. Herein, the modified reconstructedpicture (modified reconstructed samples) may be a filtered reconstructedpicture (filtered reconstructed samples).

As described above, the in-loop filtering procedure may be applied tothe reconstructed picture. In this case, a virtual boundary may bedefined to further improve subjective/objective visual quality of thereconstructed picture, and the in-loop filtering procedure may beapplied across the virtual boundary. The virtual boundary may include,for example, a discontinuous edge such as a 360-degree image, a VRimage, a bound, a Picture In Picture (PIP), or the like. For example,the virtual boundary may be present at a predetermined position, and apresence and/or position thereof may be signaled. For example, thevirtual boundary may be located at an upper fourth sample line of a CTUrow (specifically, for example, above the upper fourth sample of the CTUrow). As another example, information on the present and/or position ofthe virtual boundary may be signaled through HLS. The HLS may includethe SPS, the PPS, the picture header, the slice header, or the like asdescribed above.

Hereinafter, a high-level syntax signaling and semantics will bedescribed according to embodiments of the present disclosure.

An embodiment of the present document may include a method ofcontrolling loop filters. The present method for controlling the loopfilters may be applied to a reconstructed picture. In-loop filters (loopfilters) may be used for decoding of encoded bitstreams. The loopfilters may include the aforementioned deblocking, SAO, and ALF. The SPSmay include flags related to each of the deblocking, SAO, and ALF. Theflags may indicate whether each of tools is available for the coding ofa coded layer video sequence (CLVS) or coded video sequence (CVS)referring to the SPS.

When the loop filters are available for the CVS, the applying of theloop filters may be controlled not to be across specific boundaries. Forexample, whether the loop filters are across sub-picture boundaries maybe controlled. In addition, whether the loop filters are across tileboundaries may be controlled. In addition thereto, whether the loopfilters are across virtual boundaries may be controlled. Herein, thevirtual boundaries may be defined on CTUs based on availability of aline buffer.

Regarding whether the in-loop filtering procedure is performed acrossthe virtual boundary, in-loop filtering-related information may includeat least one of an SPS virtual boundaries enabled flag (a virtualboundaries enabled flag in an SPS), an SPS virtual boundaries presentflag, a picture header virtual boundaries present flag, an SPS pictureheader virtual boundaries present flag, or information on a virtualboundaries position.

In embodiments included in the present document, the information on thevirtual boundaries position may include information on an x-coordinateof a vertical virtual boundary and/or information on a y-coordinate of ahorizontal virtual boundary. Specifically, the information on thevirtual boundaries position may include the information on thex-coordinate of the vertical virtual boundary and/or the information onthe y-axis of the horizontal virtual boundary in units of luma samples.In addition, the information on the virtual boundaries position mayinclude information on the number of pieces of information (syntaxelements) on the x-coordinate of the vertical virtual boundary which ispresent in the SPS. In addition, the information on the virtualboundaries position may include information on the number of pieces ofinformation (syntax elements) on the y-coordinate of the horizontalvirtual boundary which is present in the SPS. Alternatively, theinformation on the virtual boundaries position may include informationon the number of pieces of information (syntax elements) on thex-coordinate of the vertical virtual boundary which is present in apicture header. In addition, the information on the virtual boundariesposition may include information on the number of pieces of information(syntax elements) on the y-coordinate of the horizontal virtual boundarywhich is present in the picture header.

According to the existing embodiments regarding signaling of virtualboundaries, even if the virtual boundaries enabled flag(sps_virtual_boundaries_enabled_flag) is true (or 1), all of flags(sps_virtual_boundaries_present_flag,ph_virtual_boundaries_present_flag) indicating a position of virtualboundaries-related information (e.g., information on positions ofvirtual boundaries) may be false (or 0). This causes an unnecessary andredundant procedure of signaling the virtual boundaries enabled flageven though no picture of the coded layer video sequence includes thevirtual boundary.

According to an embodiment of the present document, a relationshipbetween values of flags may be configured in a semantics of syntaxelements related to virtual boundaries. For example, when a feature ofdisabling loop filters which are across virtual boundaries is available,it may be restricted to define at least one picture having a virtualboundary position.

The following table shows an exemplary semantics for explaining syntaxelements (e.g., sps_virtual_boundaries_enabled_flag,sps_virtual_boundaries_present_flag,ph_virtual_boundaries_present_flag)/relationship thereof included in asequence parameter set (SPS) and/or a picture header.

TABLE 1 It is a requirement of bitstream conformance that, whensps_virtual_boundaries_enabled_flag is equal to 1 andsps_virtual_boundaries_present_flag is equal to 0, there shall be atleast one picture referring to the SPS with the value ofph_virtual_boundaries_present_flag is equal to 1.

The following table shows an exemplary semantics of a picture parameterset (PPS) according to the present embodiment.

TABLE 2 pic_parameter_set_rbsp( ) { Descriptor  ... pps_virtual_boundaries_present_in_ph_flag u(1)  ... }

The following table shows an exemplary semantics for explaining syntaxelements included in the syntax of the table above.

TABLE 3 pps_virtual_boundaries_present_in_ph_flag equal 1 specifies thatvirtual boundary information of virtual boundaries may be signalled inthe PH referring to the PPS. pps_virtual_boundaries_present_in_ph_flagequal to 0 specifies that virtual boundary information of virtualboundaries is not signalled in the PH referring to the PPS. Whensps_virtual_boundaries_present_flag is equal to 1, the value ofpps_virtual_boundaries_present_in_ph_flag shall be equal to 0.

The following table shows an exemplary semantics of a picture headeraccording to the present embodiment.

TABLE 4 picture_header_structure( ) { Descriptor  ...  if(sps_virtual_boundaries_enabled_flag &&   pps_virtual_boundaries_present_in_ph flag ) {  ph_virtual_boundaries_present_flag u(1)   if(ph_virtual_boundaries_present_flag ) {    ph_num_ver_virtual_boundariesu(2)    for( i = 0; i < ph_num_ver_virtual_boundaries; i++ )    ph_virtual_boundaries_pos_x[ i ] u(13)   ph_num_hor_virtual_boundaries u(2)    for( i = 0; i < ph num horvirtual boundaries; i++ )     ph_virtual_boundaries_pos_y[ i ] u(13)   } }  ... }

In the existing embodiments, virtual boundaries are used to support agradual decoding refresh (GDR). However, it is not optimized sincevirtual boundary-related information may be signaled for a picture whichis not necessary in practice when the GDR is available.

According to an embodiment of the present document, when the feature ofdisabling the loop filters which are across virtual boundaries and theGDR feature are available, a flag for indicating whether the virtualboundary is used to support only the GDR feature may be preset in aparameter set (e.g., SPS). In an example, the flag may be referred to asa virtual boundaries GDR usage specifying flag (orvirtual_boudaries_used_for_gdr_only_flag). For example, when the virtualboundaries GDR usage specifying flag (orvirtual_boudaries_used_for_gdr_only_flag) has a value of 1, the SPSvirtual boundaries present flag (sps_virtual_boudaries_present_flag) maynot be present and/or the SPS virtual boundaries present flag may have avalue of 0. In addition, when the virtual boundaries GDR usagespecifying flag (or virtual_boudaries_used_for_gdr_only_flag) has avalue of 1, the picture header virtual boundaries present flag(ph_virtual_boundaries_present_flag) may be present only for a GDRpicture and a last picture before a recovery point picture related tothe GDR picture. When the picture header virtual boundaries present flag(ph_virtual_boundaries_present_flag) is not present, a value thereof maybe inferred to be 0.

The following table shows an exemplary semantics of an SPS according tothe present embodiment.

TABLE 5 seq_parameter_set_rbsp( ) { Descriptor   ...  sps_virtual_boundaries_enabled_flag u(1)   if(sps_virtual_boundaries_enabled_flag &&  gdr_enabled_flag ) {  virtual_boundaries_used_for_gdr_only_flag u(1)  if(sps_virtual_boundaries_enabled_flag &&   !virtual_boundaries_used_for_gdr_only_flag) {  sps_virtual_boundaries_present_flag u(1)   if(sps_virtual_boundaries_present_flag ) {   sps_num_ver_virtual_boundaries u(2)    for( i = 0; i <sps_num_ver_virtual_boundaries; i++)     sps_virtual_boundaries_pos_x[ i] u(13)    sps_num_hor_virtual_boundaries u(2)    for( i = 0; i <sps_num_hor_virtual_boundaries; i++)     sps_virtual_boundaries_pos_y[ i] u(13)   }  }  ... }

The following table shows an exemplary semantics for explaining syntaxelements included in the syntax of the table above.

TABLE 6 virtual_boundaries_used_flag_gdr_only_flag equal 1 specifiesthat virtual boundaries signalling is persent only in pictures that isbeing refreshed (i.e., picture between a gdr picture to the last picturebefore the recovery point picture associated with the gdr picture,inclusive). virtual_boundaries_used_for_gdr_only_flag equal 0 specifiesthat the above does not apply.

The following table shows an exemplary semantics of a picture headeraccording to the present embodiment.

TABLE 7 picture_header_structure( ) { Descriptor  ...  if((sps_virtual_boundaries_enabled_flag &&!sps_virtual_boundaries_present_flag ) ∥   (virtual_boundaries_used_for_gdr_only_flag &&     PicOrderCntVal >=GdrPicOrderCntVal &&     PicOrderCntVal < RpPicOrderCntVal ) ) {  ph_virtual_boundaries_present flag u(1)   if(ph_virtual_boundaries_present_flag) {    ph_num_ver_virtual_boundariesu(2)    for( i = 0; i < ph_num_ver_virtual_boundaries; i++ )    ph_virtual_boundaries_pos_x[ i ] u(13)   ph_num_hor_virtual_boundaries u(2)    for( i = 0; i <ph_num_hor_virtual_boundaries; i++)     ph_virtual_boundaries_pos_y[ i ]u(13)   }  }  ... }

The following table shows an exemplary semantics for explaining syntaxelements included in the syntax of the table above.

TABLE 8 ... gdr_pic_flag equal to 1 specifies the picture associatedwith the PH is a GDR picture. gdr_pic_flag equal to 0 specifies that thepicture associated with the PH is not a GDR picture. When not present,the value of gdr_pic_flag is inferred to be equal to 0. Whengdr_enabled_flag is equal to 0, the value of gdr_pic_flag shall be equalto 0. ... recovery_poc_cnt specifies the recovery point of decodedpictures in output order. If the current picture is a GDR picture thatis associated with the PH, and there is a picture picA that follows thecurrent GDR picture in decoding order in the CLVS that hasPicOrderCntVal equal to the PicOrderCntVal of the current GDR pictureplus the value of recovery_poc_cnt, the picture picA is referred to asthe recovery point picture. Otherwise, the first picture in output orderthat has PicOrderCntVal greater than the PicOrderCntVal of the currentpicture plus the value of recovery_poc_cnt is referred to as therecovery point picture. The recovery point picture shall not precede thecurrent GDR picture in decoding order. The value of recovery_poc_cntshall be in the range of 0 to MaxPicOrderCntLsb − 1, inclusive. When thecurrent picture is a GDR picture, the variable RpPicOrderCntVal isderived as follows:  GdrPicOrderCntVal = PicOrderCntVal RpPicOrderCntVal = PicOrderCntVal + recovery_poc_cnt  NOTE 2 - When gdrenabled flag is equal to 1 and PicOrderCntVal of the current picture isgreater  than or equal to RpPicOrderCntVal of the associated GDRpicture, the current and subsequent  decoded pictures in output orderare exact match to the corresponding pictures produced by starting  thedecoding process from the previous IRAP picture, when present, precedingthe associated GDR  picture in decoding order. ...

Hereinafter, signaling of information on virtual boundaries which may beused in in-loop filtering will be described. Embodiments may beapplicable independently. Alternatively, at least two embodiments may beapplicable in combination.

In an embodiment of the present document, whether syntax elements forindicating virtual boundaries are included in the SPS may be controlledby a flag (e.g., SPS virtual boundaries present flag).

In an example according to the present embodiment, a virtual boundariesenabled flag (e.g., sps_virtual_boundaries_enabled_flag) may indicatewhether a feature for disabling a loop filter across virtual boundariesis enabled.

In an example according to the present embodiment, an SPS virtualboundaries present flag (e.g., sps_virtual_boundaries_present_flag) mayindicate whether signaling information for virtual boundaries isincluded in the SPS.

In an example according to the present embodiment, when the virtualboundaries enabled flag (e.g., sps_virtual_boundaries_enabled_flag) is 1and the SPS virtual boundaries present flag (e.g.,sps_virtual_boundaries_present_flag) is 0, signaling information fordisabling a loop filter which is across virtual boundaries may beincluded in a picture header.

In an example according to the present embodiment, when information onpositions of virtual boundaries (e.g., vertical virtual boundaries,horizontal virtual boundaries) is included in the SPS, a sum of thenumber of vertical virtual boundaries and the number of horizontalvirtual boundaries may be limited to be greater than 0.

In an example according to the present embodiment, variable(s) indicatewhether a filter is disabled in virtual boundaries for a current picturemay be derived. For example, the variable(s) may includeVirtualBoundairesDisabledFlag.

As one case of the present example, if the virtual boundaries enabledflag (e.g., sps_virtual_boundaries_enabled_flag) is 1 and the SPSvirtual boundaries present flag (e.g.,sps_virtual_boundaries_present_flag) is 1, thenVirtualBoundairesDisabledFlag may be 1.

As another case of the present example, if the virtual boundariesenabled flag (e.g., sps_virtual_boundaries_enabled_flag) is 1, the SPSvirtual boundaries present flag (e.g.,sps_virtual_boundaries_present_flag) is 0, and information on the numberof vertical virtual boundaries (e.g., ph_num_ver_virtual_boundaries) anda sum of information on the number of horizontal virtual boundaries(e.g., ph_num_hor_virtual_boundaries) is greater than 0, thenVirtualBoundairesDisabledFlag may be 1.

In the other cases of the present example, VirtualBoundairesDisabledFlagmay be 0.

In an embodiment of the present document, image information obtained bythe encoding apparatus and/or image information obtained through abitstream received from the encoding apparatus to the decoding apparatusmay include a sequence parameter set (SPS) and a picture header (PH).The SPS may include a virtual boundaries enabled flag(sps_virtual_boundaries_enabled_flag). The SPS may include an SPSvirtual boundaries present flag (sps_virtual_boundaries_present_flag),based on the virtual boundaries enabled flag.

For example, when a value of the virtual boundaries enabled flag is 1,the SPS may include the SPS virtual boundaries present flag. Based onthe virtual boundaries enabled flag and the SPS virtual boundariespresent flag, the SPS may include information on the number of SPSvertical virtual boundaries (sps_num_ver_virtual_boundaries),information on an SPS vertical virtual boundaries position(sps_virtual_boundaries_pos_x[i]), information on the number of SPShorizontal virtual boundaries (sps_num_hor_virtual_boundaries), andinformation on an SPS horizontal virtual boundaries position(sps_virtual_boundaries_pos_y[i]). For example, when a value of thevirtual boundaries enabled flag is 1 and a value of the SPS virtualboundaries present flag is 1, the SPS may include virtualboundaries-related information. In an example, the virtualboundaries-related information may include information on the number ofthe SPS vertical virtual boundaries, information on the SPS verticalvirtual boundaries position, information on the number of the SPShorizontal virtual boundaries, and/or information on the SPS horizontalvirtual boundaries position.

In an example, the number of pieces of information on the SPS verticalvirtual boundaries position may be determined based on the informationon the number of the SPS vertical virtual boundaries, and the number ofpieces of information on the SPS horizontal virtual boundaries positionmay be determined based on the information on the number of the SPShorizontal virtual boundaries. Based on the virtual boundaries enabledflag and the SPS virtual boundaries present flag, the picture header mayinclude information on the number of PH vertical virtual boundaries(ph_num_ver_virtual_boundaries), information on a PH vertical virtualboundaries position (ph_virtual_boundaries_pos_x[i]), information on thenumber of PH horizontal virtual boundaries(ph_num_hor_virtual_boundaries), and information on a PH horizontalvirtual boundaries position (ph_virtual_boundaries_pos_y[i]).

For example, if a value of the virtual boundaries enabled flag is 1, avalue of the SPS virtual boundaries present flag is 0, and a value ofthe PH virtual boundaries present flag is 1, then the PH may includevirtual boundaries-related information. In an example, the virtualboundaries-related information may include information on the number ofthe PH vertical virtual boundaries, information on the PH verticalvirtual boundaries position, information on the number of the PHhorizontal virtual boundaries, and/or information on the PH horizontalvirtual boundaries position.

It is possible to include information on the number of the PH verticalvirtual boundaries, information on the PH vertical virtual boundariesposition, information on the number of the PH horizontal virtualboundaries, and information on the PH horizontal virtual boundariesposition. In an example, the number of pieces of information on the PHvertical virtual boundaries position may be determined based on theinformation on the number of the PH vertical virtual boundaries, and thenumber of piece s of information on the PH horizontal virtual boundariesposition may be determined based on the information on the number of thePH horizontal virtual boundaries.

According to embodiments of the present document together with thetables above, information for performing in-loop filtering acrossvirtual boundaries may be effectively signaled. For example, in-loopfiltering may be performed based on signaling of information related towhether in-loop filtering is available across the virtual boundaries.

FIG. 7 and FIG. 8 schematically show an example of a video/imageencoding method and related components according to embodiment(s) of thepresent document.

The method disclosed in FIG. 7 may be performed by the encodingapparatus disclosed in FIG. 2 or FIG. 8 . Specifically, for example,S700 and S710 of FIG. 7 may be performed by a residual processor 230 ofthe encoding apparatus of FIG. 8 , S720 of FIG. 7 may be performed by afilter 260 of the encoding apparatus of FIGS. 8 , and S730 of FIG. 7 maybe performed by an entropy encoder 240 of the encoding apparatus of FIG.8 . In addition, although not shown in FIG. 7 , prediction samples orprediction-related information may be derived by a predictor 220 of theencoding apparatus of FIG. 7 , and a bitstream may be generated from theresidual information or the prediction-related information by theentropy encoder 240 of the encoding device. The method disclosed in FIG.7 may include the aforementioned embodiments in the present document.

Referring to FIG. 7 , the encoding apparatus may derive residual samples(S700). The encoding apparatus may derive residual samples for a currentblock, and the residual samples for the current block may be derivedbased on original samples and prediction samples of the current block.Specifically, the encoding apparatus may derive the prediction samplesof the current blocks, based on a prediction mode. In this case, variousprediction methods disclosed in the present document, such as interprediction or intra prediction, may be applied. The residual samples maybe derived based on the prediction samples and the original samples.

The encoding apparatus may derive transform coefficients. The encodingapparatus may derive the transform coefficients, based on a transformprocedure for the residual samples. For example, the transform proceduremay include at least one of a discrete cosine transform (DCT), adiscrete sine transform (DST), a graph-based transform (GBT), or aconditionally non-linear transform (CNT).

The encoding apparatus may derive quantized transform coefficients. Theencoding apparatus may derive the quantized transform coefficients,based on a quantization procedure for the transform coefficients. Thequantized transform coefficients may have a 1-dimensional vector form,based on a coefficient scan order.

The encoding apparatus may generate residual information (S710). Theencoding apparatus may generate the residual information, based on theresidual samples for the current block. The encoding apparatus maygenerate residual information indicating the quantized transformcoefficients. The residual information may be generated through variousencoding methods such as exponential Golomb, CAVLC, CABAC, or the like.

The encoding apparatus may generate reconstructed samples. The encodingapparatus may generate the reconstructed samples, based on the residualinformation. The reconstructed samples may be generated by adding theprediction sample and the residual samples based on the residualinformation. Specifically, the encoding apparatus may perform prediction(intra or inter prediction) on the current block, and may generatereconstructed samples, based on original samples and the predictionsamples generated from the prediction.

The reconstructed samples may include reconstructed luma samples andreconstructed chroma samples. Specifically, the residual samples mayinclude residual luma samples and residual chroma samples. The residualluma samples may be generated based on original luma samples andprediction luma samples. The residual chroma samples may be generatedbased on the original chroma samples and the prediction chroma samples.The encoding apparatus may derive transform coefficients for theresidual luma samples (luma transform coefficients) and/or transformcoefficients for the residual chroma samples (chroma transformcoefficients). Quantized transform coefficients may include quantizedluma transform coefficients and/or quantized chroma transformcoefficients.

The encoding apparatus may generate information related to in-loopfiltering for the reconstructed samples (S720). The encoding apparatusmay perform an in-loop filtering procedure on the reconstructed samples,and may generate information related to the in-loop filtering, based onthe in-loop filtering procedure. For example, the information related tothe in-loop filtering may include the aforementioned information onvirtual boundaries (the SPS virtual boundaries enabled flag, the pictureheader virtual boundaries enabled flag, the SPS virtual boundariespresent flag, the picture header virtual boundaries present flag,information on positions of virtual boundaries, etc.).

The encoding apparatus may encode video/image information (S730). Theimage information may include residual information, prediction-relatedinformation, and in-loop filtering-related information. The encodedvideo/image information may be output in the form of a bitstream. Thebitstream may be transmitted to a decoding apparatus through a networkor a storage medium.

The image/video information may include a variety of informationaccording to an embodiment of the present document. For example, theimage/video may include information disclosed in at least one of thetable 1 to 8 above.

In an embodiment, the in-loop filtering-related information may includea virtual boundaries enabled flag (e.g.,sps_virtual_boundaries_enabled_flag) related to whether the in-loopfiltering procedure is performed across the virtual boundaries. Forexample, the virtual boundaries enabled flag may indicate whether it ispossible to disable the in-loop filtering procedure across the virtualboundaries. The in-loop filtering procedure may be performed across thevirtual boundaries, based on the virtual boundaries enabled flag.Whether the in-loop filtering procedure is performed across the virtualboundaries may be determined based on the virtual boundaries enabledflag.

In an embodiment, the image information may include a sequence parameterset (SPS) including the virtual boundaries enabled flag.

In an embodiment, the SPS may further include an SPS virtual boundariespresent flag (e.g., sps_virtual_boundaries_present_flag). A value of apicture header virtual boundaries present flag (e.g.,ph_virtual_boundaries_present_flag) in a picture header for at least onepicture which refers to the SPS may be determined based on the virtualboundaries enabled flag or the SPS virtual boundaries present flag.

In an embodiment, the value of the picture header virtual boundariespresent flag may be 1 (or set or determined to 1), based on the virtualboundaries enabled flag with a value of 1 and the SPS virtual boundariespresent flag with a value of 0.

In an embodiment, the image information may include a picture parameterset (PPS).

In an embodiment, the PPS may include a picture header virtualboundaries present flag (e.g.,pps_virtual_boundaries_present_in_ph_flag) for a picture header whichrefers to the PPS. The picture header may include virtualboundaries-related information, based on the picture header virtualboundaries present flag with a value of 1.

In an embodiment, the PPS may include a picture header virtualboundaries present flag (e.g.,pps_virtual_boundaries_present_in_ph_flag) for a picture header whichrefers to the PPS. The SPS may further include an SPS virtual boundariespresent flag. A value of the picture header virtual boundaries presentflag (e.g., pps_virtual_boundaries_present_in_ph_flag) may be 0 (or setor determined to 0), based on the SPS virtual boundaries present flagwith a value of 1.

In an embodiment, the SPS may include a virtual boundaries gradualdecoding refresh (GDR) usage specifying flag (e.g.,virtual_boundaries_used_flag_gdr_only_flag).

In an embodiment, whether virtual boundaries-related information issignaled in the SPS or signaled in a picture header which refers to theSPS may be determined based on the virtual boundaries GDR usagespecifying flag.

In an embodiment, the SPS may include an SPS virtual boundaries presentflag (e.g., sps_virtual_boundaries_present_flag), based on the virtualboundaries GDR usage specifying flag with a value of 0.

In an embodiment, a picture header which refers to the SPS based on thevirtual boundaries GDR usage specifying flag with a value of 1 mayinclude a picture header virtual boundaries present flag (e.g.,ph_virtual_boundaries_present_flag).

In an embodiment, the picture header may include a picture headervirtual boundaries present flag (e.g.,ph_virtual_boundaries_present_flag), based on that the current picturerelated to the picture header which refers to the SPS is refreshed.

In an embodiment, the picture header may include a picture headervirtual boundaries present flag, based on a case where a picture ordercount (POC) of the current picture related to a picture header whichrefers to the SPS is greater than or equal to a POC of a GDR picture andthe POC of the current picture is less than a POC of a recovery point.

FIG. 9 and FIG. 10 schematically show an example of a video/imageencoding method and related components according to embodiment(s) of thepresent document.

The method disclosed in FIG. 9 may be performed by the decodingapparatus disclosed in FIG. 3 or FIG. 10 . Specifically, for example,S900 of FIG. 9 may be performed by an entropy decoder 310 of thedecoding apparatus, S910 may be performed by a residual processor 320and/or adder 340 of the decoding apparatus, and S920 may be performed bya filter 350 of the decoding apparatus. The method disclosed in FIG. 9may include the aforementioned embodiments in the present document.

Referring to FIG. 9 , the decoding apparatus may receive/obtainvideo/image information (S900). The video/image information may includeat least one of residual information, prediction-related information,and/or in-loop filtering-related information (and/or virtualboundaries-related information). The decoding apparatus mayreceive/obtain the image/video information through a bitstream.

The image/video information may include a variety of informationaccording to an embodiment of the present document. For example, theimage/video may include information disclosed in at least one of thetables 1 to 8 above.

The decoding apparatus may derive quantized transform coefficients. Thedecoding apparatus may derive the quantized transform coefficients,based on the residual information. The quantized transform coefficientsmay have a 1-dimensional vector form, based on a coefficient scan order.Quantized transform coefficients may include quantized luma transformcoefficients and/or quantized chroma transform coefficients.

The decoding apparatus may derive the transform coefficients. Thedecoding apparatus may derive the transform coefficients, based on adequantization procedure for the quantized transform coefficients. Thedecoding apparatus may derive luma transform coefficients throughdequantization, based on the quantized luma transform coefficients. Thedecoding apparatus may derive chroma transform coefficients throughdequantization, based on the quantized chroma transform coefficients.

The decoding apparatus may generate/derive residual samples. Thedecoding apparatus may derive the residual samples, based on theinverse-transform procedure for the transform coefficients. The decodingapparatus may derive residual luma samples through the inverse-transformprocedure, based on the luma transform coefficients. The decodingapparatus may derive residual chroma samples through theinverse-transform, based on the chroma transform coefficients.

The decoding apparatus may generate/derive reconstructed samples (S910).For example, the decoding apparatus may generate/derive reconstructedluma samples and/or reconstructed chroma samples. The decoding apparatusmay generate the reconstructed luma samples and/or the reconstructedchroma samples, based on the residual information. The decodingapparatus may generate reconstructed samples, based on the residualinformation. The reconstructed samples may include the reconstructedluma samples and/or the reconstructed chroma samples. A luma componentof the reconstructed samples may correspond to the reconstructed lumasamples, and a chroma component of the reconstructed samples maycorrespond to the reconstructed chroma samples. The decoding apparatusmay generate prediction luma samples and/or prediction chroma samplesthrough a prediction procedure. The decoding apparatus may generate thereconstructed luma samples, based on the prediction luma samples and theresidual luma samples. The decoding apparatus may generate thereconstruction chroma samples, based on the prediction chroma samplesand the residual chroma samples.

The decoding apparatus may generate modified (filtered) reconstructedsamples (S920). The decoding apparatus may generate the modifiedreconstructed samples by performing an in-loop filtering procedure forthe reconstructed samples of the current picture. The decoding apparatusmay generate the modified reconstructed samples, based on in-loopfiltering-related information (and/or virtual boundaries-relatedinformation). The decoding apparatus may use a deblocking procedure, anSAO procedure, and/or an ALF procedure to generate the modifiedreconstructed samples.

In an embodiment, the image information may include an SPS. The SPS mayinclude a virtual boundaries enabled flag (e.g.,sps_virtual_boundaries_enabled_flag) related to whether the in-loopfiltering procedure is performed across the virtual boundaries. Forexample, the virtual boundaries enabled flag may indicate whether it ispossible to disable the in-loop filtering procedure across the virtualboundaries. The in-loop filtering procedure may be performed across thevirtual boundaries, based on the virtual boundaries enabled flag.Whether the in-loop filtering procedure is performed across the virtualboundaries may be determined based on the virtual boundaries enabledflag.

In an embodiment, the SPS may further include an SPS virtual boundariespresent flag (e.g., sps_virtual_boundaries_present_flag). A value of apicture header virtual boundaries present flag (e.g.,ph_virtual_boundaries_present_flag) in a picture header for at least onepicture which refers to the SPS may be determined based on the virtualboundaries enabled flag or the SPS virtual boundaries present flag.

In an embodiment, the value of the picture header virtual boundariespresent flag may be 1 (or set or determined to 1), based on the virtualboundaries enabled flag with a value of 1 and the SPS virtual boundariespresent flag with a value of 0.

In an embodiment, the image information may include a PPS.

In an embodiment, the PPS may include a picture header virtualboundaries present flag (e.g.,pps_virtual_boundaries_present_in_ph_flag) for a picture header whichrefers to the PPS. The picture header may include virtualboundaries-related information, based on the picture header virtualboundaries present flag with a value of 1.

In an embodiment, the PPS may include a picture header virtualboundaries present flag (e.g.,pps_virtual_boundaries_present_in_ph_flag) for a picture header whichrefers to the PPS. The SPS may further include an SPS virtual boundariespresent flag. A value of the picture header virtual boundaries presentflag (e.g., pps_virtual_boundaries_present_in_ph_flag) may be 0 (or setor determined to 0), based on the SPS virtual boundaries present flagwith a value of 1.

In an embodiment, the SPS may include a virtual boundaries GDR usagespecifying flag (e.g., virtual_boundaries_used_flag_gdr_only_flag).

In an embodiment, whether virtual boundaries-related information issignaled in the SPS or signaled in a picture header which refers to theSPS may be determined based on the virtual boundaries GDR usagespecifying flag.

In an embodiment, the SPS may include an SPS virtual boundaries presentflag (e.g., sps_virtual_boundaries_present_flag), based on the virtualboundaries GDR usage specifying flag with a value of 0.

In an embodiment, a picture header which refers to the SPS based on thevirtual boundaries GDR usage specifying flag with a value of 1 mayinclude a picture header virtual boundaries present flag (e.g.,ph_virtual_boundaries_present_flag).

In an embodiment, the picture header may include a picture headervirtual boundaries present flag (e.g.,ph_virtual_boundaries_present_flag), based on that the current picturerelated to the picture header which refers to the SPS is refreshed.

In an embodiment, the picture header may include a picture headervirtual boundaries present flag, based on a case where a POC of thecurrent picture related to a picture header which refers to the SPS isgreater than or equal to a POC of a GDR picture and the POC of thecurrent picture is less than a POC of a recovery point.

When the residual sample for the current block exists, the decodingapparatus may receive the information on the residual for the currentblock. The information on the residual may include the transformcoefficients on the residual samples. The decoding apparatus may derivethe residual samples (or residual sample array) for the current blockbased on the residual information. Specifically, the decoding apparatusmay derive the quantized transform coefficients based on the residualinformation. The quantized transform coefficients may have aone-dimensional vector form based on a coefficient scan order. Thedecoding apparatus may derive the transform coefficients based on thedequantization process for the quantized transform coefficients. Thedecoding apparatus may derive the residual samples based on thetransform coefficients.

The decoding apparatus may generate a reconstructed samples based on the(intra) prediction samples and residual samples, and may derive thereconstructed block or the reconstructed picture based on thereconstructed samples. Specifically, the decoding apparatus may generatereconstructed samples based on a sum between the (intra) predictionsamples and the residual samples. Thereafter, as described above, thedecoding apparatus may apply an in-loop filtering process such asdeblocking filtering and/or SAO process to the reconstructed picture inorder to improve the subjective/objective picture quality, if necessary

For example, the decoding apparatus may obtain image informationincluding all or parts of the above-described pieces of information (orsyntax elements) by decoding the bitstream or the encoded information.Further, the bitstream or the encoded information may be stored in acomputer readable storage medium, and may cause the above-describeddecoding method to be performed.

Although methods have been described on the basis of a flowchart inwhich steps or blocks are listed in sequence in the above-describedembodiments, the steps of the present document are not limited to acertain order, and a certain step may be performed in a different stepor in a different order or concurrently with respect to that describedabove. Further, it will be understood by those ordinary skilled in theart that the steps of the flowcharts are not exclusive, and another stepmay be included therein or one or more steps in the flowchart may bedeleted without exerting an influence on the scope of the presentdisclosure.

The aforementioned method according to the present disclosure may be inthe form of software, and the encoding apparatus and/or decodingapparatus according to the present disclosure may be included in adevice for performing image processing, for example, a TV, a computer, asmart phone, a set-top box, a display device, or the like.

When the embodiments of the present disclosure are implemented bysoftware, the aforementioned method may be implemented by a module(process or function) which performs the aforementioned function. Themodule may be stored in a memory and executed by a processor. The memorymay be installed inside or outside the processor and may be connected tothe processor via various well-known means. The processor may includeApplication-Specific Integrated Circuit (ASIC), other chipsets, alogical circuit, and/or a data processing device. The memory may includea Read-Only Memory (ROM), a Random Access Memory (RAM), a flash memory,a memory card, a storage medium, and/or other storage device. In otherwords, the embodiments according to the present disclosure may beimplemented and executed on a processor, a micro-processor, acontroller, or a chip. For example, functional units illustrated in therespective figures may be implemented and executed on a computer, aprocessor, a microprocessor, a controller, or a chip. In this case,information on implementation (for example, information on instructions)or algorithms may be stored in a digital storage medium.

In addition, the decoding apparatus and the encoding apparatus to whichthe embodiment(s) of the present document is applied may be included ina multimedia broadcasting transceiver, a mobile communication terminal,a home cinema video device, a digital cinema video device, asurveillance camera, a video chat device, and a real time communicationdevice such as video communication, a mobile streaming device, a storagemedium, a camcorder, a video on demand (VoD) service provider, an OverThe Top (OTT) video device, an internet streaming service provider, a 3Dvideo device, a Virtual Reality (VR) device, an Augment Reality (AR)device, an image telephone video device, a vehicle terminal (forexample, a vehicle (including an autonomous vehicle) terminal, anairplane terminal, or a ship terminal), and a medical video device; andmay be used to process an image signal or data. For example, the OTTvideo device may include a game console, a Bluray player, anInternet-connected TV, a home theater system, a smartphone, a tablet PC,and a Digital Video Recorder (DVR).

In addition, the processing method to which the embodiment(s) of thepresent document is applied may be produced in the form of a programexecuted by a computer and may be stored in a computer-readablerecording medium. Multimedia data having a data structure according tothe embodiment(s) of the present document may also be stored in thecomputer-readable recording medium. The computer readable recordingmedium includes all kinds of storage devices and distributed storagedevices in which computer readable data is stored. The computer-readablerecording medium may include, for example, a Bluray disc (BD), auniversal serial bus (USB), a ROM, a PROM, an EPROM, an EEPROM, a RAM, aCD-ROM, a magnetic tape, a floppy disk, and an optical data storagedevice. The computer-readable recording medium also includes mediaembodied in the form of a carrier wave (for example, transmission overthe Internet). In addition, a bitstream generated by the encoding methodmay be stored in the computer-readable recording medium or transmittedthrough a wired or wireless communication network.

In addition, the embodiment(s) of the present document may be embodiedas a computer program product based on a program code, and the programcode may be executed on a computer according to the embodiment(s) of thepresent document. The program code may be stored on a computer-readablecarrier.

FIG. 11 represents an example of a contents streaming system to whichthe embodiment of the present document may be applied.

Referring to FIG. 11 , the content streaming system to which theembodiments of the present document is applied may generally include anencoding server, a streaming server, a web server, a media storage, auser device, and a multimedia input device.

The encoding server functions to compress to digital data the contentsinput from the multimedia input devices, such as the smart phone, thecamera, the camcorder and the like, to generate a bitstream, and totransmit it to the streaming server. As another example, in a case wherethe multimedia input device, such as, the smart phone, the camera, thecamcorder or the like, directly generates a bitstream, the encodingserver may be omitted.

The bitstream may be generated by an encoding method or a bitstreamgeneration method to which the embodiments of the present document isapplied. And the streaming server may temporarily store the bitstream ina process of transmitting or receiving the bitstream.

The streaming server transmits multimedia data to the user equipment onthe basis of a user's request through the web server, which functions asan instrument that informs a user of what service there is. When theuser requests a service which the user wants, the web server transfersthe request to the streaming server, and the streaming server transmitsmultimedia data to the user. In this regard, the contents streamingsystem may include a separate control server, and in this case, thecontrol server functions to control commands/responses betweenrespective equipment in the content streaming system.

The streaming server may receive contents from the media storage and/orthe encoding server. For example, in a case the contents are receivedfrom the encoding server, the contents may be received in real time. Inthis case, the streaming server may store the bitstream for apredetermined period of time to provide the streaming service smoothly.

For example, the user equipment may include a mobile phone, a smartphone, a laptop computer, a digital broadcasting terminal, a personaldigital assistant (PDA), a portable multimedia player (PMP), anavigation, a slate PC, a tablet PC, an ultrabook, a wearable device(e.g., a watch-type terminal (smart watch), a glass-type terminal (smartglass), a head mounted display (HMD)), a digital TV, a desktop computer,a digital signage or the like.

Each of servers in the contents streaming system may be operated as adistributed server, and in this case, data received by each server maybe processed in distributed manner.

Claims in the present description can be combined in a various way. Forexample, technical features in method claims of the present descriptioncan be combined to be implemented or performed in an apparatus, andtechnical features in apparatus claims can be combined to be implementedor performed in a method. Further, technical features in method claim(s)and apparatus claim(s) can be combined to be implemented or performed inan apparatus. Further, technical features in method claim(s) andapparatus claim(s) can be combined to be implemented or performed in amethod.

What is claimed is:
 1. An image decoding method performed by a decodingapparatus, comprising: obtaining image information including residualinformation through a bitstream; generating reconstructed samples of acurrent picture, based on the residual information; and generatingmodified reconstructed samples, based on an in-loop filtering procedurefor the reconstructed samples, wherein the image information includes asequence parameter set (SPS), wherein the SPS includes a virtualboundaries enabled flag, and wherein the in-loop filtering procedure isperformed across the virtual boundaries, based on the virtual boundariesenabled flag.
 2. The image decoding method of claim 1, wherein the SPSfurther includes an SPS virtual boundaries present flag, and wherein avalue of a picture header virtual boundaries present flag in a pictureheader for at least one picture which refers to the SPS is determinedbased on the virtual boundaries enabled flag and the SPS virtualboundaries present flag.
 3. The image decoding method of claim 2,wherein the value of the picture header virtual boundaries present flagis 1, based on the virtual boundaries enabled flag with a value of 1 andthe SPS virtual boundaries present flag with a value of
 0. 4. The imagedecoding method of claim 1, wherein the image information furtherincludes a picture parameter set (PPS), wherein the PPS includes apicture header virtual boundaries present flag for a picture headerwhich refers to the PPS, and wherein the picture header includes virtualboundaries-related information, based on the picture header virtualboundaries present flag with a value of
 1. 5. The image decoding methodof claim 1, wherein the image information further includes a pictureparameter set (PPS), wherein the PPS includes a picture header virtualboundaries present flag for a picture header which refers to the PPS,wherein the SPS further includes an SPS virtual boundaries present flag,and wherein a value of the picture header virtual boundaries presentflag is 0, based on the SPS virtual boundaries present flag with a valueof
 1. 6. The image decoding method of claim 1, wherein the SPS includesa virtual boundaries gradual decoding refresh (GDR) usage specifyingflag, and wherein whether virtual boundaries-related information issignaled in the SPS or signaled in a picture header which refers to theSPS is determined based on the virtual boundaries GDR usage specifyingflag.
 7. The image decoding method of claim 1, wherein the SPS includesa virtual boundaries GDR usage specifying flag, and wherein the SPSincludes an SPS virtual boundaries present flag, based on the virtualboundaries GDR usage specifying flag with a value of
 0. 8. The imagedecoding method of claim 7, wherein a picture header which refers to theSPS based on the virtual boundaries GDR usage specifying flag with avalue of 1 includes a picture header virtual boundaries present flag. 9.The image decoding method of claim 7, wherein the picture headerincludes a picture header virtual boundaries present flag, based on thatthe current picture related to the picture header which refers to theSPS is refreshed.
 10. The image decoding method of claim 7, wherein thepicture header includes a picture header virtual boundaries presentflag, based on a case where a picture order count (POC) of the currentpicture related to a picture header which refers to the SPS is greaterthan or equal to a POC of a GDR picture and the POC of the currentpicture is less than a POC of a recovery point.
 11. An image encodingmethod performed by an encoding apparatus, comprising: generatingresidual samples for a current block; generating residual information,based on the residual samples for the current block; generating in-loopfiltering-related information for reconstructed samples of a currentpicture; and encoding image information including the residualinformation and the in-loop filtering-related information, wherein thein-loop filtering-related information includes a virtual boundariesenabled flag related to whether an in-loop filtering procedure isperformed across virtual boundaries.
 12. The image encoding method ofclaim 11, wherein the image information includes a sequence parameterset (SPS) including the virtual boundaries enabled flag, wherein the SPSfurther includes an SPS virtual boundaries present flag, and wherein avalue of a picture header virtual boundaries present flag in a pictureheader for at least one picture which refers to the SPS is determinedbased on the virtual boundaries enabled flag and the SPS virtualboundaries present flag.
 13. The image encoding method of claim 12,wherein the value of the picture header virtual boundaries present flagis 1, based on the virtual boundaries enabled flag with a value of 1 andthe SPS virtual boundaries present flag with a value of
 0. 14. The imageencoding method of claim 11, wherein the image information furtherincludes a sequence parameter set (SPS) and picture parameter set (PPS)including the virtual boundaries enabled flag, wherein the PPS includesa picture header virtual boundaries present flag for a picture headerwhich refers to the PPS, and wherein the picture header includes virtualboundaries-related information, based on the picture header virtualboundaries present flag with a value of
 1. 15. The image encoding methodof claim 11, wherein the image information includes an SPS and PPSincluding the virtual boundaries enabled flag, wherein the PPS includesa picture header virtual boundaries present flag for a picture headerwhich refers to the PPS, wherein the SPS further includes an SPS virtualboundaries present flag, and wherein a value of the picture headervirtual boundaries present flag is 0, based on the SPS virtualboundaries present flag with a value of
 1. 16. The image encoding methodof claim 11, wherein the image information includes an SPS including thevirtual boundaries enabled flag, wherein the SPS includes a virtualboundaries gradual decoding refresh (GDR) usage specifying flag, andwherein whether virtual boundaries-related information is signaled inthe SPS or signaled in a picture header which refers to the SPS isdetermined based on the virtual boundaries GDR usage specifying flag.17. The image encoding method of claim 11, wherein the image informationincludes an SPS including the virtual boundaries enabled flag, whereinthe SPS includes a virtual boundaries GDR usage specifying flag, andwherein the SPS includes an SPS virtual boundaries present flag, basedon the virtual boundaries GDR usage specifying flag with a value of 0.18. The image encoding method of claim 17, wherein a picture headerwhich refers to the SPS based on the virtual boundaries GDR usagespecifying flag with a value of 1 includes a picture header virtualboundaries present flag.
 19. The image encoding method of claim 17,wherein the picture header includes a picture header virtual boundariespresent flag, based on that the current picture related to the pictureheader which refers to the SPS is refreshed.
 20. A computer readablestorage medium storing encoded information causing an image decodingapparatus to perform an image decoding method, the image decoding methodcomprising: obtaining image information including residual informationthrough a bitstream; generating reconstructed samples of a currentpicture, based on the residual information; and generating modifiedreconstructed samples, based on an in-loop filtering procedure for thereconstructed samples, wherein the image information includes a sequenceparameter set (SPS), wherein the SPS includes a virtual boundariesenabled flag, and wherein the in-loop filtering procedure is performedacross the virtual boundaries, based on the virtual boundaries enabledflag.